<?php


Yii::app()->clientScript->registerScript('search', "
$('.search-form form').submit(function(){
    $('#resultados').attr('style','display:block');
    $.fn.yiiListView.update('directoriolistview', { 
        //this entire js section is taken from admin.php. w/only this line diff
        data: $(this).serialize()
    });
    return false;
});
");
?>
 

<div class="search-form" style="background:none;">
    
    
    
<?php  $this->renderPartial('_search',array(
    'model'=>$model,
    'paises'=>$paises,
    'deportes'=>$deportes,
)); ?>
</div>
<div id="resultados" style="display:none">
    
    <h3>Resultados</h3>
    
    <?php 

   

    $this->widget('zii.widgets.CListView', array(
    'dataProvider'=>$dataProvider,
    'itemView'=>'_view',
    'id'=>'directoriolistview',       // must have id corresponding to js above
    'sortableAttributes'=>array(
        'id',
        'Nombre',
        'Apellidos',
        'Deporte',
    ),
)); 
    
?>
    <div class="clear"></div>
</div>